<template>
  <div>

  </div>
</template>

<script lang="ts" setup>
import { getAllUser } from "@/api/user";
import { ref, onMounted } from "vue";


const userList = ref([])

const loadUser = async () => {
  const res = await getAllUser()
  userList.value = res.data
  if (res.data.code === 0) {
    userList.value = res.data
    alert(res.data.msg)
  } else {
    alert(res.data.msg)
  }

}

onMounted(() => {
  loadUser()
})

</script>
